from collections import Generator, Iterable, Iterator


def gen_fun():
    for i in range(5):
        yield i


def gen():
    print('111111')
    yield '111111'
    print('222222')
    yield '222222'
    print('333333')
    yield '333333'


if __name__ == '__main__':
    g1 = gen_fun()
    print(g1)
    g2 = gen()
    print(g2)
    print(g2.__iter__())
    print(g2.__next__())
    print(g2.__next__())
    print(g2.__next__())
